package com.rop.znyx.acl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.rop.znyx.model.acl.Permission;
import java.util.List;

/**
 * Created with IntelliJ IDEA
 * User: Rop
 * Date: 2023/6/16
 * Time: 13:34
 * Description: 菜单管理
 */
public interface PermissionService extends IService<Permission> {

    /**
     * 获取所有菜单列表
     */
    List<Permission> queryAllMenu();

    /**
     * 递归删除
     */
    boolean removeChildById(Long id);

    /**
     * 获取角色拥有的权限
     */
    List<Permission> findRoleByUserId(Long id);

    /**
     * 给角色分配菜单
     */
    boolean doAssign(Long roleId, Long[] permissionId);
}
